package com.dlc.shop.bean.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

/**
 *
 *
 * @author YXF
 * @date 2021-09-08 10:42:00
 */
@Data
@TableName("tz_purchase_prod")
public class PurchaseProd implements Serializable{
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "id" )
    private Long purchaseProdId;

    @Schema(description = "采购编号" )
    private String purchaseNumber;

    @NotNull(message = "采购商品不能为空")
    @Schema(description = "供应商品id" )
    private Long supplierProdId;

    @Schema(description = "商品id" )
    private Long prodId;

    @Schema(description = "sku id" )
    private Long skuId;

    @NotNull(message = "采购金额不能为空")
    @Schema(description = "采购金额" )
    private Double purchaseAmount;

    @NotNull(message = "采购价不能为空")
    @Schema(description = "采购价" )
    private Double purchasePrice;

    @NotNull(message = "采购数量不能为空")
    @Min(value = 1, message = "采购数量要大于0")
    @Schema(description = "采购库存数量" )
    private Integer purchaseStock;

    @Schema(description = "实际库存数量" )
    private Integer actualStock;

    @Schema(description = "状态 0:已作废 1:待入库 2:部分入库 3:已完成" )
    private Integer status;

    @TableField(exist = false)
    @Schema(description = "商品主图" )
    private String pic;

    @TableField(exist = false)
    @Schema(description = "商品名称" )
    private String prodName;

    @TableField(exist = false)
    @Schema(description = "sku名称" )
    private String skuName;

    @TableField(exist = false)
    @Schema(description = "商家编码" )
    private String partyCode;

    @TableField(exist = false)
    @Schema(description = "商品库存" )
    private Integer stocks;

    @TableField(exist = false)
    @Schema(description = "最小订货量" )
    private Integer minOrderQuantity;

    @TableField(exist = false)
    @Schema(description = "剩余入库量" )
    private Integer remainingStock;

    @TableField(exist = false)
    @Schema(description = "是否删除" )
    private Integer isDelete;

    @TableField(exist = false)
    @Schema(description = "入库仓库存")
    private Integer inStock;

}
